package com.yuanchu.search.client;

import com.yuanchu.search.dto.QueryGoodsList;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-01-24 11:55
 */
@FeignClient(value = "yuanchu-goods", fallbackFactory = FeignGoodsServiceClientFallbackFactory.class)
public interface FeignGoodsClient {


    /**
     * 查询商品信息
     * @param goodsId
     * @return
     */
    @GetMapping("/goods/goods/dto")
    QueryGoodsList queryGoodsDto(@RequestParam("categoryId") Integer goodsId);

    @GetMapping("/goods/category/goods/ids")
    List<Integer> queryByGoodsIds(@RequestParam("categoryId") Integer categoryId);

    @GetMapping("/goods/goods/name")
    String queryGoodsName(@RequestParam("goodsId") Integer goodsId);
}
